Page({
    data: {
        scrollTop: 0,
        navData: [{
                title: '基础',
                sub: [
                    { name: 'navbar', title: '导航栏' },
                    { name: 'background', title: '背景' },
                    { name: 'form', title: '表单' },
                ]
            },
            {
                title: '视图',
                sub: [{ name: 'avatar', title: '头像' },
                    { name: 'title', title: '标题' },
                    { name: 'tag', title: '标签' },
                    { name: 'button', title: '按钮' },
                    { name: 'image', title: '图片' },
                    { name: 'code', title: '代码' },
                    { name: 'progress', title: '进度条' },
                    { name: 'loading', title: '加载' }
                ]
            },
            {
                title: '布局',
                sub: [{ name: 'flex', title: '容器' },
                    { name: 'menu', title: '菜单' },
                    { name: 'fixed', title: '浮动' },
                    { name: 'card', title: '卡片' },
                    { name: 'list', title: '列表' },
                    { name: 'grid', title: '栅栏' },
                    { name: 'timeline', title: '时间轴' },
                    { name: 'table', title: '表格' }
                ]
            },
            {
                title: '交互',
                sub: [{ name: 'popover', title: '气泡框' },
                    { name: 'modal', title: '模态框' },
                    { name: 'toast', title: '轻提示' },
                    { name: 'drawer', title: '抽屉' },
                    { name: 'collapse', title: '折叠面板' },
                    { name: 'tab', title: '选项卡' },
                    { name: 'swiper', title: '轮播图' },
                    { name: 'steps', title: '步骤条' }
                ]
            },
            {
                title: '表单',
                sub: [{ name: 'form-item/input', title: '输入框' },
                    { name: 'form-item/radio', title: '单选框' },
                    { name: 'form-item/checkbox', title: '复选框' },
                    { name: 'form-item/switch', title: '开关' },
                    { name: 'form-item/picker', title: '选择器' }
                ]
            }],
    },
    onLoad (options) {

    },
    onShow() {

    },
    jumpPage(e){
        const url = e.currentTarget.dataset.url;
        this.navigatePage(`/pages/components/${url}/index`);
    }
});